.flash {
  position: relative;
  margin-bottom: 10px;
  width: 400px;
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: 0 1px 12px var(--shadow-color);
  text-shadow: 0 1px 1px rgba(#000, 0.1);
  color: #fff;
  font-weight: bold;
  animation: 0.3s ease;
  animation-name: flash-message-in;
  pointer-events: all;

  &.is-exiting {
    animation: 0.3s forwards ease-in-out;
    animation-name: flash-message-out;
  }
}

.flash.success {
  background: var(--color-green);

  .icon {
    opacity: 0.7;
    stroke: var(--color-green);
  }
}

.flash.socket {
  background: var(--color-socket);

  .icon {
    opacity: 0.7;
    stroke: var(--color-socket);
  }
}

.flash.error {
  background: var(--color-error);

  .icon {
    opacity: 0.7;
    stroke: var(--color-error);
  }
}

.content {
  display: flex;
  align-items: flex-start;
  padding: 15px 25px 15px 15px;
}

.text {
  flex: 1 1 auto;
  margin-top: 2px;
  line-height: 1.4;
  font-size: 11px;
}

.icon {
  width: 20px;
  height: 20px;
  margin-right: 14px;
}

.deleteButton {
  position: absolute;
  top: 6px;
  right: 0;
  background: none;
  text-align: center;

  &:focus {
    outline: none;

    .deleteButton-icon {
      stroke: #fff;
    }
  }
}

.deleteButton-icon {
  width: 13px;
  height: 13px;
  stroke: rgba(#fff, 0.6);
}

@keyframes flash-message-in {
  0% {
    margin-top: -30px;
    opacity: 0;
  }

  100% {
    margin-top: 0;
    opacity: 1;
  }
}

@keyframes flash-message-out {
  0% {
    margin-top: 0;
    opacity: 1;
  }

  100% {
    margin-top: -30px;
    opacity: 0;
  }
}
